#include <reg52.h>
#include <intrins.h>

sbit relay = P2^1;
sbit D0_ON = P3^5;
sbit D3_OFF = P3^3;





void main()
{
	
	while(1)
	{
		while(D0_ON == 1)
		{
			relay = 0;
	 	}
		while(D3_OFF == 1 && relay == 0)
		{
			relay = 1;
		}
		
	}
}



//while(D3_OFF != 0)
//			{
//				relay = 1;
//			}